import { View, Text } from '@tarojs/components'

const PriceDisplay = ({ price, originalPrice, saved }) => {
  return (
    <View className='product-price'>
      <Text className='current-price'>¥{price}</Text>
      {originalPrice && originalPrice > 0 && (
        <Text className='original-price'>¥{originalPrice}</Text>
      )}
      {saved && saved > 0 && (
        <Text className='saved-price'>已省¥{saved}</Text>
      )}
    </View>
  )
}

export default PriceDisplay
